bvapi.js
). The instructions in this topic are not compatible with the BV loader (bv.js
).
Search engine optimization (SEO) is critical to boosting your website traffic from organic searches. Bazaarvoice's server-side SEO solution (BVSEO) integrates into the top-level domain of your website and provides better results and support for search engines other than Google. The server-side solution organizes user-generated content (UGC) for increased overall search efficiency, and it complies with current SEO best practices to ensure that all search engines index valuable UGC.
Examples:
Java |
<% import="com.bazaarvoice.seo.sdk.model.ContentType"%> |
ASP.NET |
using System; |
PHP |
<?php |
In addition, our client-side JavaScript integration is provided by default with our hosted solution and takes advantage of Google’s enhanced JavaScript indexing capabilities. If your search traffic comes largely from Google, the client-side JavaScript integration provides similar SEO benefit with less overhead. Together, the server-side and client-side SEO solutions provide outstanding SEO performance and deliver an optimized user experience.
Learn more about optimizing search:
Getting to five-star SEO: Advice from Bazaarvoice experts
Bazaarvoice-managed content is injected into your pages' source code via a server-side software development kit (SDK). Here is the list of supported features for Java, .NET, and PHP.
Feature | Description | Java | .NET | PHP |
---|---|---|---|---|
Ratings & Reviews | Product ratings and reviews content is injected using getContent, getReviews, and getAggregateRating. | ✔ | ✔ | ✔ |
Questions & Answers | Product questions and answers content is injected using getContent. | ✔ | ✔ | ✔ |
Seller Ratings | Seller Ratings content is accessed using getContent. | ✔ | ✔ | ✔ |
Multiple configuration support | Multiple configurations are supported in a single environment. | ✔ | ✔ | |
SSL | Access content using a secured layer. | ✔ | ✔ | ✔ |
Proxy support | Access content using proxy gateways in a restricted network. | ✔ | ✔ | ✔ |
Debugging | Troubleshooting information is available for debugging purpose. | ✔ | ✔ | ✔ |
Charset | Supports user-specific character sets when retrieving content. | ✔ | ✔ | ✔ |
To set up BVSEO, your technical team needs to perform the following:
User-generated content (UGC) served by Bazaarvoice takes advantage of Google's expanded JavaScript indexing performance. Understanding the following concepts can help you get more search engine optimization (SEO) benefit when using JavaScript to deploy UGC.
Bazaarvoice adds correctly formed schema.org markup to UGC served to your web pages. When Google indexes this markup, the likelihood of review rich snippets appearing in search results increases.
When UGC content spans more than one page, Bazaarvoice uses href links between pages, allowing search engines to index the content more easily.
When shoppers view a product page that contains more than one page of reviews, they interact only with the JavaScript. The URL does not change. Bazaarvoice dynamically creates href links between pages of UGC for search indexing only, allowing search engines to point shoppers directly to relevant results.
Bazaarvoice appends a bvstate parameter to URLs. This parameter uses key/value pairs to define the content type and page of UGC to display. The following table lists examples of possible uses of the bvstate parameter.
Parameter text | Explanation |
---|---|
|
|
|
|
Bazaarvoice adds the bvstate parameter to URLs in the canonical tag for your implementation. Consumers only encounter the bvstate parameter when following links from search results.
Begin your implementation by answering questions in the following sections to help eliminate surprises and delays during setup.
Option A: Use a platform plug-in
If the website is built on Demandware, Magento, Hybris, or GSI, it is probable that a plug-in will be used to deploy BVSEO.
Option B: Use one of the BVSEO SDKs
If the website is built using Java, .NET, or PHP, BVSEO SDKs will make the SEO-friendly integration simple. Proceed to the next question to review information that should be considered prior to deployment of the BVSEO SDKs.
Option C: Develop a custom solution based on the BVSEO SDKs
If the website is built using a different technology, Ruby or Perl for example, you will need to develop a custom solution. The BVSEO SDKs are open-sourced, published in GitHub, and provide a reliable guide for those developing a custom solution. Proceed to Section 2, which is also relevant to custom solution development.
1. Will server-side coding be possible?
2. Is a page-level cache involved? (Akamai is often used for page level caching.)
Caching may be used to improve the speed and efficiency in ways that affect the BVSEO integration. Consider the following questions related to caching.
3. Does the page use the complete URL as its cache key?
Caching may be used to improve the speed and efficiency in ways that affect the BVSEO integration. Consider the following questions related to caching.
BVSEO uses bvrrp, bvqap, bvsyp, and bvpage as URL parameters to manage pagination. http://example.com and http://example.com?bvrrp=stuff are unique pages and must be treated as unique pages by page-level caching systems.
4. Will a local cache be used to reduce server-side calls to the cloud?
BVSEO makes an HTTP or HTTPS request to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging), which returns formatted HTML as a string. While our cloud service contains a cache for exceptionally efficient delivery (often sub 20ms), some clients opt to add an additional layer of local caching.
5. Will a proxy be needed?
BVSEO must have access to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging) via HTTP or HTTPS. IP addresses are not available. Because BVSEO uses floating IP addresses in the cloud, we do not guarantee that IP addresses will remain consistent. If the firewall requires an IP address, a proxy must be set up to provide a consistent IP address. The SDKs contain proxy configuration options.
6. Will firewall settings need to be adjusted?
BVSEO must have access to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging) via HTTP or HTTPS. If the firewall restricts access to this address, adjustments will be needed.
7. Will SSL connections be required?
While the content retrieved from seo.bazaarvoice.com does not contain any data that needs to be protected, security policies may require that all server-side connections are protected by SSL. SSL support is available in the Java SDK v2.1 (and above) and .NET SDK v2.1 (and above).
8. Are the pages using schema.org Microdata?
Bazaarvoice only supports and recommends schema.org microdata for structured markup. Other formats have been tested and have not yielded results as desirable as this format. Bazaarvoice uses the schema.org/Product page to guide our tagging.
9. Do the pages already contain schema.org markup?
If the page where BVSEO is being deployed contains any schema.org markup, meticulous attention to detail must be used to ensure that the schema markup does not conflict.
10. Do the pages already contain a schema.org type, also known as a parent class?
Pages must only contain one schema.org type, such as schema.org/Product, schema.org/Event, schema.org/LocalBusiness, schema.org/Person, etc.
<div>
tag that contains both the BVRRSummaryContainer and BVRRContainer modules.
<div>
tag that contains both the BVRRSummaryContainer and BVRRContainer modules.
<div itemprop=name>[ProductName]</div>
or <meta itemprop="name" content="[ProductName]" />
11. Do the pages have canonical tags?
If canonical tags are used on pages where BVSEO is implemented, these tags must either be updated or removed when the product contains more than one page of reviews, which is typically more than eight reviews. These canonical tags must be removed since BVSEO is paginating the product page so that all reviews are in the search engines’ index. Canonical tags that point away from a pagination URL will cause search engines to ignore the paginated content.
Then, make sure you meet the following prerequisite conditions:
PHP 5.5 or above with curl and Mbstring library
Have at least one product with reviews in the system.
During setup, you must know your BVSEO:
If you do not know these values, contact
Bazaarvoice Support to request the information.
Follow these steps to configure the SEO options:
The following requirements are necessary to install the Java SDK.
Bazaarvoice follows the Oracle support levels for the JRE supported by the Java SDK. For more information, refer to the Oracle Java SE Support Roadmap .
Download the appropriate Java SDK file:
After you unzip the file, choose the package from the following table that best suits your environment:
Java SDK | Description |
---|---|
Bv-seo-sdk-{version}-jar-with-dependencies.jar | All dependencies are contained in the file. |
Bv-seo-sdk-{version}.jar | No dependencies are contained in the file. |
Bv-seo-sdk-{version}-osgi.jar | This SDK is for OSGi supported environments only. |
If you're not sure which SDK you should use, choose one based on the following scenarios.
Bv-seo-sdk-{version}-osgi.jar
SDK. This is the recommended library for OSGi environments.
Bv-seo-sdk-{version}-jar-with-dependencies.jar
file if there are no version conflicts caused by the SDK libraries used in your environment.
bv-seo-sdk-{version}.jar
file. This library does not contain any dependencies, so you must identify missing libraries and supply them manually. This can be done during compilation if there are compilation errors, or during runtime if there are "class not found" errors.
The BVSEO SDKs suit most environments. However, the BVSEO SDKs are open sourced under an Apache license and can be customized to your needs. Any customizations must be done at your own risk and will not be supported by Bazaarvoice.
Fork from the following link to perform customizations: github.com/bazaarvoice/seo_sdk_java
Follow these steps to set up your project.
To set up your project, configure settings in your server-side Java environment and prepare your development environment.
The Java SDK supports the collection of user agent strings, which allows us to provide UGC better tailored to consumers. If your company uses Java EE to host your website, you must update your web.xml file , located in your WEB-INF folder.
Copy and paste the following text into the <web-app>
element in your web.xml
file:
<filter> <filter-name>BVSeoSdkRequestFilter</filter-name> <filter-class>com.bazaarvoice.seo.sdk.servlet.RequestFilter</filter-class> </filter> <filter-mapping> <filter-name>BVSeoSdkRequestFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Follow these steps to configure your development environment. Example values for each step are provided along with example code. Refer to Java code examples for full example code for various scenarios that you can configure to your needs.
Example: sampleweb
Example: bv-seo-sdk-{version}-jar-with-dependencies.jar
Example: sample.jsp
Example: Coding sample.jsp
Example: The project is run from IDE, which uses Tomcat.
Example: http://localhost:8080/sampleweb/sample.jsp
Your project structure should look like the following example:
Follow these steps to set up the JSP file you created in the previous procedure.
The example code uses BVSdkConfiguration class, which is an implementation of BVConfiguration. Ensure that com.bazaarvoice.seo.sdk.config.BVConfiguration is imported in the page and add appropriate configurations using addProperty. Refer to the BVConfiguration section of Java SDK inputs and features for details.
The addProperty method is used to add configuration/properties to the BVSdkConfiguration and takes parameters enum type BVClientConfig and String type value. The example shows various properties already added.
Follow these steps to test and debug your application of the Java SDK.
Example: http://localhost:8080/SampleWeb/sample.jsp
<metadata>
tags should appear inside the BVRRContainer.
<ul id="BVSEOSDK_meta" style="display:none !important"> <li data-bvseo="sdk">bvseo_sdk, java_sdk, bvseo-x.y.z</li> <li data-bvseo="sp_mt">getContent, method:CLOUD, 188ms</li> <li data-bvseo="ct_st">REVIEWS, PRODUCT</li> </ul>
If the SEO metadata tags do not match, troubleshoot and take appropriate action based on the error message in the SEO <metadata>
tag.
To debug your application, complete these steps:
Add the bvreveal=debug parameter to the URL of any page where BVSEO is implemented.
Example: http://yoursite.net/ExampleGetContent.aspx?bvreveal=debug
The bvreveal=debug parameter adds BVSEOSDK_meta and BVSEOSDK_DEBUG lists to the source code, which contain information about your implementation. If there is no UGC, bvseo-msg will provide more details.
Check if content exists for the requested contentURL, as described in the following steps:
<li data-bvseo="contentURL">http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm</li>
curl –i
command. Example: curl –i "http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm"
If the curl command does not return content, it could be a firewall issue or no content exists for this ProductID. Contact your Bazaarvoice representative for further troubleshooting.
The following error messages may appear when debugging.
Example:
HTML |
<ul id="BVSEOSDK_meta" style="display:none!important"> |
This topic provides details about the core classes in the BVSEO SDK, including configuration options and methods of use for the Java platform.
BVConfiguration configures the BVSEO SDK. It has two APIs:
BVConfiguration is an interface under com.bazaarvoice.seo.sdk.config and the known implementation class is com.bazaarvoice.seo.sdk.config.BVSdkConfiguration.
BVConfiguration bvConfiguration = new BVSdkConfiguration();
Adding and setting attributes in BVConfiguration changes the functionality and behavior of the SDK. Configuration options are listed in the SDK configuration attributes table.
Set attributes using BVConfiguration.addProperty (BVClientConfig bvClientConfig, String value).
bvConfiguration.addProperty(BVClientConfig.CLOUD_KEY, “your_cloud_key”);
Attribute | Type | Description |
---|---|---|
CLOUD_KEY | Required | Cloud key string. Specifies the key used to locate the cloud SEO files. Contact Bazaarvoice to obtain the value you need for this property. This attribute is optional if LOAD_LOCAL_FILES is used. |
BV_ROOT_FOLDER | Required | Folder path declaration. Specifies the folder where SEO files are located. This is also known as the display code. Unique root folders are created for each deployment zone and locale. Contact Bazaarvoice to obtain the value you need for this property. |
SEO_SDK_ENABLED |
Optional |
Boolean. Specifies whether to enable SEO SDK (True) or disable it (False).
Default: True |
EXECUTION_TIMEOUT | Optional |
Numeric value. Specifies the time in milliseconds (ms) to complete the SEO call for user agents and search engine bots (such as browsers) not in CRAWLER_AGENT_PATTERN.
Default: 500 |
EXECUTION_TIMEOUT_BOT | Optional |
Numeric value. Specifies the time in milliseconds (ms) to complete the SEO call for search engine bots that match CRAWLER_AGENT_PATTERN.
Default: 2000 |
CRAWLER_AGENT_PATTERN | Optional |
List of search engine bot user agents. Overrides the default list of search engine bot user agents. You can add and remove agents from the list. Multiple values are separated by “|”.
Default: msnbot|google|teoma|bingbot| yandexbot|yahoo |
STAGING | Optional |
Boolean value. Specifies whether to get SEO contents from staging (True) or from production (False) . Not applicable when using LOAD_SEO_FILES_LOCALLY. Default: False ![]() |
SOCKET_TIMEOUT | Optional |
Numeric value. Specifies atimeout for establishing connection and reading complete contents. Used internally by the SDK.
|
CONNECT_TIMEOUT | Optional |
Numeric value. Specifies a timeout for establishing connection to cloud SEO. Used internally by the SDK. Do not modify unless necessary.
Default: 2000 ms |
CHARSET | Optional |
Character set declaration. Specifies a character set. If not specified, the default value is UTF-8. For example, use "shift_jis" when the Shift JIS character set is used.
Default: Uses the default value set by your operating system. |
SSL_ENABLED | Optional |
Boolean value. Specifies whether or not SSL connections are required (True). Not applicable when using LOAD_SEO_FILES_LOCALLY.
|
PROXY_HOST | Optional |
Proxy host declaration. Specifies a proxy host, which is needed by some clients for security reasons. The most common use case is when firewall rules can only be set for an IP address, not a domain. Cloud SEO uses a wide range of IP addresses that are subject to change at any time, so Bazaarvoice does not provide cloud SEO IP addresses to clients. Not applicable when using LOAD_SEO_FILES_LOCALLY.
![]() |
PROXY_PORT | Optional | Numeric value. Specifies the port number on which the proxy/gateway system is listening. Use with PROXY_HOST. |
LOAD_SEO_FILES_LOCALLY | Optional | (Not recommended.) Boolean value. Specifies whether to load SEO files locally (True) or not (False). Local file configurations can help overcome system limitations. A local file system can be fragile since Bazaarvoice is not responsible for the daily retrieval, unpacking, and distribution of SEO files. To enable local files, LOCAL_SEO_FILE_ROOT must be set. |
LOCAL_SEO_FILE_ROOT | Optional |
(Not recommended.) Boolean value. Specifies whether to set the root path of the extracted SEO contents to BV_ROOT_FOLDER on the local file system (True) or not (False). Use with LOAD_SEO_FILES_LOCALLY. |
BVParameters are the page or product display page-level parameters that access the SEO contents of a particular product. Use the attributes listed in the following SDK parameters table to set field values.
This is a model used by the SDK in the com.bazaarvoice.seo.sdk.model.BVParameters class.
BVParameters bvParameters = new BVParameters();
bvParameters.setSubjectId(“exampleProduct1”);
bvParameters.set…
…
…
Attribute | Type | Description |
---|---|---|
setUserAgent | Required | Browser’s user-agent header information. This is used by the SDK to identify if it is a search engine bot or a normal user. This information can be retrieved from HTTPServletRequest in Java. This search engine bot is determined and matched from the configuration set by CRAWLER_AGENT_PATTERN. |
setBaseURI | Required |
URL that is used to create pagination links. Bazaarvoice will add the parameter bvstate to the base_url. In most cases, this should include the product or service page's canonical URL.
Required for product reviews. The URL can be absolute, relative, or blank (null is allowed). |
setPageURI | Required | Sends all query parameters attached to the current URL. Bazaarvoice will use these parameters to determine which page of reviews or questions and answers content to include. You must send the full URL. |
setSubjectID | Required | Identifier for the SEO subject to retrieve the content, which depends on the SubjectType you select. For example, if SubjectType is Product, this value is the productId. If SubjectType is Category, this value is reviewId. |
setContentType | Required | Enum type, defined in ContentType, that retrieves SEO content. Possible values include REVIEWS, REVIEWSPAGE, QUESTIONS, QUESTIONSPAGE, and UNIVERSAL. |
setSubjectType | Required | Enum type defined in SubjectType that retrieves content for a specific subject type. Possible values are PRODUCT, CATEGORY, ENTRY, or DETAIL. |
BVUIContent is used to get SEO contents after you supply the correct BVConfiguration and BVParameters.
BVUIContent exposes three APIs: getContent, getReviews, and getAggregateRating. Each of these requires valid BVParameters. The following BVUIContent APIs table explains how to use the APIs.
BVUIContent is the interface located in package com.bazaarvoice.seo.sdk. The implementation class is com.bazaarvoice.seo.sdk.BVManagedUIContent.
BVUIContent bvUIContent = new BVManagedUIContent(bvConfiguration);
String theContent = bvUIContent.getContent(bvParameters);
API | Purpose |
---|---|
getContent(BVParameters) | Retrieves the complete content of the subject. Supported content types include REVIEWS and QUESTIONS. Content types are set inside BVParameters. Inject this content in the rating summary section of the product display page. The contents collected are injected as a single block of markup. The markup includes the main content and aggregate content, where applicable. |
getReviews(BVParameters) | Retrieves the reviews section and omits the aggregate section of the content type REVIEWS. This content is injected to the Review section of the product display page. |
getAggregateRating(BVParameters) | Retrieves the aggregate rating section of the REVIEWS content type. Inject this content in the rating summary section of the product display page. |
The examples contained in this topic deploys the SDKs directly in the presentation layer, which simplifies the code but is not a recommended practice. The purpose of this example is to show an SDK integration. Ensure that you update your code to use correct values.
This example shows Ratings & Reviews integration of BVSEO.
This example shows Ratings & Reviews integration of BVSEO with optional configuration parameters.
This example shows Ratings & Reviews integration of BVSEO for implementations that do not use BVRRSummaryContainer. All other code examples include the summary container.
This example shows Ratings & Reviews integration of BVSEO using the local file system for file retrieval, instead of the cloud. Refer to Select a file method in Best Practices for more information.
This example shows Ratings & Reviews integration of BVSEO using a proxy.
This example shows Ratings & Reviews and Questions & Answers integration of BVSEO.
The following requirements are necessary to install the .NET SDK:
Download the appropriate .NET SDK file from the following location:
The following table describes the files that are included in your download.
Filename | Description |
---|---|
BVSeoSdkDotNet.dll | BVSEO library that supports both cloud SEO and the local file method. |
Commons.dll | Library dependency for Apache Commons. |
log4net.dll | Library dependency for logging. |
NVelocity.dll | Library dependency for Apache NVelocity, which handles templating. |
BVSeoSdkDotNet.pdb | Contains debugging information. |
The BVSEO SDKs suit most environments. However, the BVSEO SDKs are open sourced under an Apache license and can be customized to your needs. Any customizations must be done at your own risk and will not be supported by Bazaarvoice.
Fork from the following link to perform customizations: github.com/bazaarvoice/seo_sdk_dotnet
Follow these steps to set up your project. Each step includes an example value.
Example: SampleWebApplication
Example: Sample.aspx example code
Follow these steps to set up the .NET code:
Refer to .NET SDK inputs and features for more detailed information on each of these steps.
Refer to .NET code examples for code examples.
Follow these steps to test and debug your application of the .NET SDK:
Example: http://localhost:8080/Sample.aspx
<metadata>
tags should appear inside the BVRRContainer.
<metadata>
tags, as shown in the following code sample, appear after every review.
<ul id="BVSEOSDK_meta" style="display:none!important;"> <li data-bvseo="sdk">bvseo_sdk, net_sdk, x.y.z.0</li> <li data-bvseo="sp_mt">getReviews, method:CLOUD, 33ms</li> <li data-bvseo="ct_st">REVIEWS, PRODUCT</li> </ul>
If the SEO <metadata>
tags do not match as shown in the code sample, troubleshoot and take appropriate action based on the error message displayed in the SEO <metadata>
tag.
To debug your application, complete these steps:
Add the bvreveal=debug parameter to the URL of any page where BVSEO is implemented.
Example: http://yoursite.net/ExampleGetContent.aspx?bvreveal=debug
The bvreveal=debug parameter adds BVSEOSDK_meta and BVSEOSDK_DEBUG lists to the source code, which contain information about your implementation. If there is no UGC, bvseo-msg will provide more details.
Check if content exists for the requested contentURL, as described in the following steps:
<li data-bvseo="contentURL">http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm</li>
curl –i
command. Example: curl –i "http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm"
If the curl command does not return content, it could be a firewall issue or no content exists for this ProductID. Contact your Bazaarvoice representative for further troubleshooting.
The following error messages may appear when debugging.
Example:
This topic provides details about the core classes in the BVSEO SDK, including configuration options and methods of use for the .NET platform.
BVConfiguration configures the BVSEO SDK. It has two APIs:
BVSdkConfiguration is an implementation interface for BVConfiguration. Make sure to add using BVSeoSdkDotNet.Config.
BVConfiguration bvConfig = new BVSdkConfiguration();
Adding and setting attributes in BVConfiguration changes the functionality and behavior of the SDK. Configuration options are listed in the following SDK configuration attributes table.
Set these attributes using the addProperty method on BVConfiguration.
.NET usage: bvConfig.addProperty(BVClientConfig.CLOUD_KEY, “your_cloud_key”);
Attribute | Type | Description |
---|---|---|
CLOUD_KEY | Required | Cloud key string. Specifies the key used to locate the cloud SEO files. Contact Bazaarvoice to obtain the value you need for this property. This attribute is optional if LOAD_LOCAL_FILES is used. |
BV_ROOT_FOLDER | Required | Folder path declaration. Specifies the folder where SEO files are located. This is also known as the display code. Unique root folders are created for each deployment zone and locale. Contact Bazaarvoice to obtain the value you need for this property. |
SEO_SDK_ENABLED |
Optional |
Boolean. Specifies whether to enable SEO SDK (True) or disable it (False).
Default: True |
EXECUTION_TIMEOUT | Optional |
Numeric value. Specifies the time in milliseconds (ms) to complete the SEO call for user agents and search engine bots (such as browsers) not in CRAWLER_AGENT_PATTERN.
Default: 500 |
EXECUTION_TIMEOUT_BOT | Optional |
Numeric value. Specifies the time in milliseconds (ms) to complete the SEO call for search engine bots that match CRAWLER_AGENT_PATTERN.
Default: 2000 |
CRAWLER_AGENT_PATTERN | Optional |
List of search engine bot user agents. Overrides the default list of search engine bot user agents. You can add and remove agents from the list. Multiple values are separated by “|”.
Default: msnbot|google|teoma|bingbot| yandexbot|yahoo |
STAGING | Optional |
Boolean value. Specifies whether to get SEO contents from staging (True) or from production (False) . Not applicable when using LOAD_SEO_FILES_LOCALLY. Default: False ![]() |
SOCKET_TIMEOUT | Optional |
Numeric value. Specifies atimeout for establishing connection and reading complete contents. Used internally by the SDK.
|
CONNECT_TIMEOUT | Optional |
Numeric value. Specifies a timeout for establishing connection to cloud SEO. Used internally by the SDK. Do not modify unless necessary.
Default: 2000 ms |
CHARSET | Optional |
Character set declaration. Specifies a character set. If not specified, the default value is UTF-8. For example, use "shift_jis" when the Shift JIS character set is used.
Default: Uses the default value set by your operating system. |
SSL_ENABLED | Optional |
Boolean value. Specifies whether or not SSL connections are required (True). Not applicable when using LOAD_SEO_FILES_LOCALLY.
|
PROXY_HOST | Optional |
Proxy host declaration. Specifies a proxy host, which is needed by some clients for security reasons. The most common use case is when firewall rules can only be set for an IP address, not a domain. Cloud SEO uses a wide range of IP addresses that are subject to change at any time, so Bazaarvoice does not provide cloud SEO IP addresses to clients. Not applicable when using LOAD_SEO_FILES_LOCALLY.
![]() |
PROXY_PORT | Optional | Numeric value. Specifies the port number on which the proxy/gateway system is listening. Use with PROXY_HOST. |
LOAD_SEO_FILES_LOCALLY | Optional | (Not recommended.) Boolean value. Specifies whether to load SEO files locally (True) or not (False). Local file configurations can help overcome system limitations. A local file system can be fragile since Bazaarvoice is not responsible for the daily retrieval, unpacking, and distribution of SEO files. To enable local files, LOCAL_SEO_FILE_ROOT must be set. |
LOCAL_SEO_FILE_ROOT | Optional |
(Not recommended.) Boolean value. Specifies whether to set the root path of the extracted SEO contents to BV_ROOT_FOLDER on the local file system (True) or not (False). Use with LOAD_SEO_FILES_LOCALLY. |
BVParameters are the page or product display page-level parameters that access the SEO contents of a particular product. Use the attributes listed in the following SDK parameters table to set field values.
This is a model used by the SDK that is added using BVSeoSdkDotNet.Model
BVParameters bvParameters = new BVParameters
{
BaseURI = <baseURI>,
…
SubjectId = “exampleProduct1”
};
Or
BVParameters bvParameters = new BVParameters();
bvParameters.SubjectId = “exampleProduct1”
…
Attribute | Type | Description |
---|---|---|
setUserAgent | Required | Browser’s user-agent header information. This is used by the SDK to identify if it is a search engine bot or a normal user. This information can be retrieved from HTTPServletRequest in Java. This search engine bot is determined and matched from the configuration set by CRAWLER_AGENT_PATTERN. |
setBaseURI | Required |
URL that is used to create pagination links. Bazaarvoice will add the parameter bvstate to the base_url. In most cases, this should include the product or service page's canonical URL.
Required for product reviews. The URL can be absolute, relative, or blank (null is allowed). |
setPageURI | Required | Sends all query parameters attached to the current URL. Bazaarvoice will use these parameters to determine which page of reviews or questions and answers content to include. You must send the full URL. |
setSubjectID | Required | Identifier for the SEO subject to retrieve the content, which depends on the SubjectType you select. For example, if SubjectType is Product, this value is the productId. If SubjectType is Category, this value is reviewId. |
setContentType | Required | Enum type, defined in ContentType, that retrieves SEO content. Possible values include REVIEWS, REVIEWSPAGE, QUESTIONS, QUESTIONSPAGE, and UNIVERSAL. |
setSubjectType | Required | Enum type defined in SubjectType that retrieves content for a specific subject type. Possible values are PRODUCT, CATEGORY, ENTRY, or DETAIL. |
BVUIContent is used to get SEO contents after you supply the correct BVConfiguration and BVParameters.
BVUIContent exposes three APIs: getContent, getReviews, and getAggregateRating. Each of these requires valid BVParameters. The following BVUIContent APIs table explains how to use the APIs.
BVManagedUIContent is an implementation for BVUIContent and is added using BVSeoSdkDotNet.Content.
BVUIContent bvUIContent = new BVManagedUIContent(bvConfig);
string theContent = bvUIContent.getContent(bvParameters);
API | Purpose |
---|---|
getContent(BVParameters) | Retrieves the complete content of the subject. Supported content types include REVIEWS and QUESTIONS. Content types are set inside BVParameters. Inject this content in the rating summary section of the product display page. The contents collected are injected as a single block of markup. The markup includes the main content and aggregate content, where applicable. |
getReviews(BVParameters) | Retrieves the reviews section and omits the aggregate section of the content type REVIEWS. This content is injected to the Review section of the product display page. |
getAggregateRating(BVParameters) | Retrieves the aggregate rating section of the REVIEWS content type. Inject this content in the rating summary section of the product display page. |
The examples contained in this topic deploy the SDK directly on an empty ASP.NET project with ASPX webform code behind a page, which simplifies the code but is not a recommended practice. The purpose of these examples is to show how an SDK integration is done. Ensure that you update your code to use proper values.
This example shows Ratings & Reviews integration of BVSEO.
You can also use the following HTML code snippet.
This example shows Ratings & Reviews integration of BVSEO with optional configuration parameters.
You can also use the following HTML code snippet.
You can also use the following HTML code snippet.
This example shows Seller Ratings integration of BVSEO.
You can also use the following HTML code snippet.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ex_simple_srd.aspx.cs" Inherits="Aspx_Examples.ex_simple_srd" %>
<!DOCTYPE html> <head runat="server"> <title></title> </head> <body> <h1>SellerRatingsDisplay Integration</h1> <div> <div id="BVSellerRatingsContainer" runat="server"></div> </div> </body>
This example shows Ratings & Reviews integration of BVSEO using the local file system for file retrieval, instead of the cloud. Refer to Select a file method for more information.
You can also use the following HTML code snippet.
This example shows Ratings & Reviews integration of BVSEO using a proxy.
You can also use the following HTML code snippet.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ex-simple-rr-cloud-proxy.aspx.cs" Inherits="Aspx_Examples.ex_simple_rr_cloud_proxy" %>
<!DOCTYPE html> <head runat="server"> <title></title> </head> <body> <h1>Reviews Integration of BVSEO</h1> <h2>using cloud for file retrieval via a proxy</h2>
<div itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="The Amazing Wonder Ball" /> <div id="BVRRSummaryContainer" runat="server"></div> <div id="BVRRContainer" runat="server"></div> </div> </body>
This example shows Ratings & Reviews and Questions & Answers integration of BVSEO.
You can also use the following HTML code snippet.
The following requirements are necessary to install the PHP SDK:
PHP 5.5 or higher with curl and mbstring library
Download the appropriate PHP SDK file from the following location:
The following files are included in the download.
Filename | Description |
---|---|
Bvseosdk.php | BVSEO library that supports both cloud SEO and the local file method. |
BVFooter.php | Used to generate content and debug the SDK footer. |
BVUtility.php | Common utility functions used by the BVSEO SDK library. |
The BVSEO SDKs suit most environments. However, the BVSEO SDKs are open sourced under an Apache license and can be customized to your needs. Any customizations must be done at your own risk and will not be supported by Bazaarvoice.
Fork from the following link to perform customizations: gitco.com/bazaarvoice/seo_sdk_php
Follow these steps to set up your project. Example values for each step are provided, along with example code. Refer to PHP code examples for full example code for various scenarios that you can configure to your needs.
Example: sampleweb.php
require('bvseosdk.php');Instantiate the bv object, as shown in the following code snippet.
$bv = new BV(array( 'bv_root_folder' => 'Main_Site-en_US', 'subject_id' => 'product1', 'cloud_key' => 'agileville-911', 'staging' => TRUE )).Call $bv->reviews->getContent() inside
<div id="BVRRContainer"></div>
to get the BVSEO content, as shown in the following code snippet. This call will return the BVSEO HTML code as a string.
<div id="BVRRContainer"> <?php echo $bv->reviews->getContent();?> </div>
Follow these steps to test your application of the PHP SDK.
Example: http://localhost:8080/sampleweb.php
<metadata>
tags should appear inside the BVRRContainer.
<metadata>
tags, as shown in the following code sample, appear after every review.
<ul id="BVSEOSDK_meta" style="display:none !important"> <li data-bvseo="sdk">bvseo_sdk, p_sdk, bvseo-x.y.z.0</li> <li data-bvseo="sp_mt">getContent, method:CLOUD, 188ms</li> <li data-bvseo="ct_st">REVIEWS, PRODUCT</li> </ul>
If the SEO <metadata>
tags do not match as shown in the code sample, troubleshoot and take appropriate action based on the error message displayed in the SEO <metadata>
tag.
This topic provides details about the core classes in the BVSEO SDK, including configuration options and methods of use for the PHP platform.
Configuration settings are added as BV class constructor parameters. Set configuration properties by placing them in the options array with the attribute in lowercase as a key and value.
Set EXECUTION_TIMEOUT to 5000 by adding it to the options array key with value of execution_timeout => 5000.
$bv = new BV(array(
// Required fields
'cloud_key' => 'myshco-3e3001e88d9c32d19a17cafacb81bec7',
'bv_root_folder' => 'Main_Site-ja_JP',
'subject_id' =>’5000001’,
// Our optional parameters
'execution_timeout' => 5000,
));
Adding and setting attributes changes the functionality and behavior of the SDK. Configuration options are listed in the following PHP SDK configuration attributesPHP SDK parameters tables.
All configuration settings are added when you instantiate the BV class.
Attribute | Type | Description |
---|---|---|
CLOUD_KEY | Required | Used to locate the cloud SEO files. Contact Bazaarvoice to obtain the value you need for this property. This attribute is optional if LOAD_LOCAL_FILES is used. |
BV_ROOT_FOLDER | Required | The folder where SEO files are located. This is also known as the display code. Unique root folders are created for each deployment zone and locale.Contact Bazaarvoice to obtain the value you need for this property. |
base_url | Required |
URL that is used to create pagination links. Bazaarvoice will add the parameter bvstate to the base_url. In most cases, this should include the product or service page's canonical URL.
Required for product reviews. The URL can be absolute, relative, or blank (null is allowed). |
page_url | Required | Sends all query parameters attached to the current URL. Bazaarvoice will use these parameters to determine which page of reviews or questions & answers content to include. It is not required to send the full URL. |
subject_id | Required | Identifier for the SEO subject to retrieve the content, which depends on the content you want to receive. For Reviews and Questions, this is the ProductID. |
SEO_SDK_ENABLED |
Optional |
Boolean value used to turn SEO SDK ON (True) or OFF (False).
Default: True |
EXECUTION_TIMEOUT | Optional |
Time in milliseconds (ms) to complete the SEO call for user-agents and search engine bots (such as browsers) not in CRAWLER_AGENT_PATTERN.
Default: 500 |
EXECUTION_TIMEOUT_BOT | Optional |
Time in milliseconds (ms) to complete the SEO call for search engine bots that match CRAWLER_AGENT_PATTERN.
Default: 2000. |
CRAWLER_AGENT_PATTERN | Optional |
Overrides the default list of search engine bot user agents. You can add and remove agents from the list. Multiple values are separated by “|”.
Default:msnbot|google|teoma|bingbot|yandexbot|yahoo. |
STAGING | Optional |
Set to True to get SEO contents from staging or False to get SEO contents from production. Not applicable when using LOAD_SEO_FILES_LOCALLY. Default: False ![]() |
SOCKET_TIMEOUT | Optional |
Used internally by the SDK as a timeout for establishing connection and reading complete contents.
Default: 2000 ms |
CONNECT_TIMEOUT | Optional |
Used internally by the SDK as a timeout for establishing connection to cloud SEO. Do not modify unless it is necessary.
Default: 2000 ms |
CHARSET | Optional |
Use this string input to when character sets other than UTF-8 are used. For example, when the Shift JIS character set is used, the input should be "shift_jis"
Default: Uses the default value set by your OS. |
SSL_ENABLED | Optional |
Set this value to "true" if SSL connections are required. Not applicable when using LOAD_SEO_FILES_LOCALLY. Default: False |
PROXY_HOST | Optional | Proxy support is needed by some clients for security reasons. The most common use case is when firewall rules can only be set for an IP address, not a domain. Cloud SEO uses a wide range of IP addresses that are subject to change at any time, so Bazaarvoice does not provide cloud SEO IP addresses to clients. To enable proxy, PROXY_HOST and PROXY_PORT must be set. Not applicable when using LOAD_SEO_FILES_LOCALLY. |
PROXY_PORT | Optional | Port number on which the proxy/gateway system is listening. To be used along with PROXY_HOST. |
LOAD_SEO_FILES_LOCALLY | Optional | (Not recommended.) Local file configurations may be required to overcome system limitations. A local file system can be fragile since Bazaarvoice is not responsible for the daily retrieval, unpacking, and distribution of SEO files. To enable local files, LOCAL_SEO_FILE_ROOT must be set. Possible values are either True or False. |
LOCAL_SEO_FILE_ROOT | Optional |
(Not recommended.) Attribute to set the root path of the extracted SEO contents to BV_ROOT_FOLDER on the local file system. Should be used along with LOAD_SEO_FILES_LOCALLY. |
content_type | Optional | Set according to which method is called. Use with SEOGetContent. |
subject_type | Optional | Set according to which method is called. |
After you create a BV class instance, it can call questions and reviews.
$BVContent = $bv->reviews->getContent();
API | Purpose |
---|---|
getContent() | Gets the complete content of the subject. Supported content types include REVIEWS and QUESTIONS. These are set inside BVParameters. Inject this content in the rating summary section of the product display page. The contents collected will be injected as a single block of markup. This includes the main content and aggregate content where applicable. |
getReviews() | Gets the reviews section and omits the aggregate section of the content type REVIEWS. This content should be injected to the Review section of the product display page. |
getAggregateRating() | Gets the aggregate rating section of the REVIEWS content type. Inject this content in the rating summary section of the product display page. |
The following code examples show the usage of BVSEO in PHP. Ensure that you update your code to use proper values.
Use this example code to return Seller Ratings content.
<?php //Please provide cloud_key and bv_root_folder require('bvseosdk.php'); $bv = new BV(array( 'bv_root_folder' => '', 'cloud_key' => '', 'page_url' => '', 'subject_id' => 'seller' )); ?><!DOCTYPE html> <html> <head> <title>BV SDK PHP Example - GetContent</title> </head> <body> This is a test page for SellerRatings: getContent() <br> GetContent() will return Seller Ratings content <br><br>
<div id="BVRRContainer"> <?php echo $bv->sellerratings->getContent(); ?> </div> </body> </html>
Use this example code to return aggregate rating and review content. Bazaarvoice recommends this code for PDPs.
<?php //Please provide cloud_key, bv_root_folder and subject_id require('bvseosdk.php'); $bv = new BV(array( 'bv_root_folder' => 'Main_Site-en_US', 'subject_id' => 'subjectID', 'cloud_key' => 'company-384757834788734', 'page_url' => 'http://www.company.com/category/sub-category?query=value', 'base_url' => 'http://www.company.com/category/sub-category', //Ensure the protocol, http:// or https://, matches the production site. )); ?><!DOCTYPE html> <html> <head> <title>BV SDK PHP Example - Simple Ratings & Reviews (recommended method)</title> </head> <body> <div itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="ProductName" /> <div id="BVRRSummaryContainer"> <?php echo $bv->reviews->getAggregateRating(); ?> </div> <div id="BVRRContainer"> <?php echo $bv->reviews->getReviews(); ?> </div> </body> </html>
Use this example code to return Ratings & Reviews and aggregate content.
The following best practices will help you maximize SEO benefit on your product review pages.
Even if you have a reviews tab on a product overview page, users appreciate seeing review content when they scroll down the page. Without reviews on the overview page, search engines perceive your overview pages as stale. Adding eight reviews to the page substantially increases the freshness score in the Google algorithm. Additionally, pages with some visible reviews (not under a tab) more consistently receive rich snippet stars in Google search results.
Follow these steps to set the number of reviews to display on the product overview page:
If you don’t have access to Configuration in the Bazaarvoice Portal, file a support ticket to set the number of reviews.
This element of the BVSEO strategy is most likely to help your existing pages rise in search results for target phrases.
Sorting by relevance is better for both SEO and conversion. The relevance algorithm looks for reviews that are rich with content and recently published, so it loads your initial display of reviews with content that attracts search engines. This element of the BVSEO strategy improves a page's content-to-link ratio, density of target keywords, and the volume of synonyms and adjectives that support target keywords.
Follow these steps to set the sorting methods available to users:
If you don't have access to Configuration in the Bazaarvoice Portal, file a support ticket to set the sorting methods.
Extensive testing confirms that both users and search engine bots react most favorably when your site contains multiple pages for a product, and when pages after the overview contain about 30 reviews each. Whether you use the BVSEO SDKs or implement your own solution, ensure that no more than 30 reviews appear on each page.
If you considered pagination in the past and concluded that it was difficult to implement, be aware that the current BVSEO implementation method has simplified the process significantly. This element of the strategy is most likely to increase long-tail traffic.
The new pages that result from pagination are the optimal place to target keywords that contain the word "reviews." In most cases, adding "reviews" to a logical place in the title and heading tags will help the pages rank highly for competitive search phrases like "[your shoe brand] reviews" or "[your hotel name] reviews."
This element of the BVSEO strategy is most likely to help your pages rank highly for phrases that contain the word "reviews."
Google awards rich snippet stars to web pages that contain social review content with clean and proper schema.org markup, and that do not hide important details. Rich snippet stars are the stars that appear in Google search results, as shown in the following image.
The following notes and suggestions are based on the BVSEO team's experience with hundreds of clients since the launch of Google's rich snippet stars.
For rich snippet stars to display successfully, Google's search engine bots must not perceive that review summary content is hidden by CSS in any way. You might have to alter the way tabs are implemented, or implement reviews outside of a tab, if rich snippet stars don't show up in search results within 3-4 weeks of your implementation.
When Google first launched rich snippet stars, the company maintained an allowlist and blocklist (sometimes called a "whitelist" and "blacklist") for awarding the stars. Remnants of the lists might still be active.
The BVSEO SDKs support both cloud SEO and local file method (previously "smart SEO") configurations. Cloud SEO is strongly recommended over the local file system configuration for the following reasons:
If technical limitations make the cloud-based solution not feasible for your site, Bazaarvoice also offers a downloadable daily zip file that contains everything you need to make your implementation SEO-friendly.
If you need to use the local file method, complete the following steps and refer to the local code examples for your platform to complete a local SEO integration.
Use the information in the following sections to troubleshoot your BVSEO implementation.
Bazaarvoice recommends you use the Safari web browser, available for Windows and Mac, for web-based testing.
Yes. Bazaarvoice offers Demandware, Magento, Hybris, and GSI plug-ins to deploy BVSEO. Contact your Bazaarvoice sales or technical services representative for more information.
If your website is built using a different technology, you will need to develop a custom solution. The BVSEO SDKs are open sourced, published in GitHub, and provide a reliable guide for developing a custom solution.
BVSEO does not support APIs. For API documentation, refer to developer.bazaarvoice.com.
You can use caching to improve speed and efficiency in ways that affect BVSEO integration.
If implementing BVSEO on pages using a page-level cache, increase EXECUTION_TIMEOUT to 2000ms.
BVSEO uses bvrrp, bvqap, bvsyp, and bvpage as URL parameters to manage pagination. The following URLs must be treated as unique pages by page-level caching systems:
If you are not following this method, the cache system and URL masking system must be updated as part of your BVSEO deployment.
It is very common to use a local caching system to reduce the number of calls that the system makes to the cloud SEO servers. The SDK does not include caching services, but the response from the SDK can be cached. TTL (time-to-live) for the local cache should not exceed three hours.
Canonical tags appear in the page's source code as <link rel="canonical" href=
. On pages where BVSEO is implemented, canonical tags must be updated or removed when the product contains more than one page of reviews. (One page contains eight reviews.) BVSEO paginates the product page so all reviews are in the search engines’ indexes. Canonical tags that point away from a pagination URL will cause search engines to ignore the paginated content.
BVSEO appends pagination parameters to your URL in the form of name/value pairs. When any of the BVSEO pagination parameters (bvstate, bvrrp, bvqap, bvsyp, bvpage) are present, perform one of the following actions:
It's not uncommon for canonical tags to point to an alternate URL. If the canonical URL points away from the page being evaluated, get the source code from the canonical page and use that instead.
Adding rel="next" and rel="prev" to links is not a recommended practice. Bazaarvoice's testing and interpretation of Google’s pagination guidelines proves that these tags should not apply to a list of reviews. The tags tell searches to default to the first page of reviews only, even if more relevant content exists on a subsequent page. For more details about this recommendation, read Google's paginated content guidelines .
Bazaarvoice recommends using the cloud-based file method. It requires less effort and is more reliable than the local file method, which requires more effort and long-term management. Refer to the "Select a file method" section of best practices for more information.
BVSEO makes an HTTP or HTTPS request to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging), which returns formatted HTML as a string. While the cloud service contains caches for exceptionally efficient delivery (often less than 20ms), some clients opt to add an additional layer of local caching. If a local cache is used, Bazaarvoice recommends a maximum TTL of one hour.
If the firewall requires an IP address, you must set up a proxy to provide a consistent IP address. BVSEO must have access to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging) via HTTP or HTTPS. BVSEO uses floating IP addresses in the cloud, which cannot guarantee consistent IP addresses. To set up a proxy, use BVClientConfig.PROXY_HOST and PROXY_PORT to point the SDK to the proxy.
BVSEO must have access to seo.bazaarvoice.com (seo-stg.bazaarvoice.com for staging) using HTTP or HTTPS. If the firewall restricts access to this address, adjustments are needed.
While the content retrieved from seo.bazaarvoice.com does not contain any data that needs to be protected, security policies may require that all server-side connections are protected by SSL. SSL support is available in the Java SDK v2.1 (and above) and .NET SDK v2.1 (and above). To enable SSL connections, set BVClientConfig.SSL_ENABLED to true when deploying the SDK.
The SDK configuration includes two execution timeout settings: EXECUTION_TIMEOUT and EXECUTION_TIMEOUT_BOT.
Older versions of the BVSEO SDK included a bot detection feature that completely blocked the injection if a user agent was detected. The BOT_DETECTION configuration was removed from the BVSEO SDK beginning with version 2.1. If you want to replicate the bot detection functionality, set EXECUTION_TIMEOUT equal to 0.
Bazaarvoice supports and recommends schema.org Microdata for structured markup, as it yields the best results of all formats we have tested. Bazaarvoice uses the schema.org/Product page to guide our tagging.
Answer the following important questions to ensure that your schema.org markup is set up correctly.
Ensure that you are using the latest version of Ratings & Reviews to deploy important updates. Check your Configuration settings for updates.
If the page where BVSEO is being deployed contains any schema.org markup, you must pay meticulous attention to detail to ensure that the schema markup does not conflict. All schema.org markup must be properly nested in a single hierarchy. Carefully audit the HTML output to ensure a proper schema.org code hierarchy is present.
Rich snippet stars are the stars that appear in Google search results, as shown in the following image.
Read this blog post for information about successfully displaying rich snippet stars.
Refer to the following questions to ensure that Google's rich snippet stars appear in search results for your product pages.
For best results, pages should use schema.org Microdata. For more information, refer to Getting started with schema.org using Microdata .
While the schema.org/WebPage declaration is not required, many web sites use it. It's required that WebPage be the outermost schema.org-related node.
For rich snippet stars to display, include a schema.org type on the page. The schema.org/Product type works well for most eCommerce websites. However, other types such as LocalBusiness, Recipe, Event, or Restaurant hierarchies might be more accurate for your page.
The product name should be within the schema.org/Product class using <div itemprop=name>[ProductName]</div>
or <meta itemprop="name" content="[ProductName]" />
.
While it seems logical that Google would display rich snippet stars for organizations, it did not when Bazaarvoice last tested it. Bazaarvoice recommends schema.org/LocalBusiness for organizations with a physical location.
Google will display rich snippet stars only for sites that contain a maximum of one type.
AggregateRating, and all sub-elements, must be nested within schema.org/Product.
BVSEO hides portions of the HTML to reduce flashing while AJAX content decoration occurs. However, aggregate rating markup and pagination links must not be hidden by CSS or a NOSCRIPT tag. For example, wrapping the BVSEO content with <div style="display:none;">
prevents Google from rendering rich snippet stars.
BVSEO code may look repetitious because itemprop="itemReviewed" is repeated many times. However, rich snippet stars display more consistently when both AggregateRating and Review schemas contain this tag, which confirms that the page is still addressing the same item. This is especially true for pages with extensive markup.
Use only one type of structured markup. Pages should not contain data-vocabulary.org or hreview (microformats) content. All structured markup should use schema.org format.
Bazaarvoice syndicates content across hundreds of brands and retailers and is not concerned about duplicate content causing issues. When content is duplicated or syndicated between a brand and a retailer (in either direction), it is beneficial for several reasons:
Bazaarvoice recommends that every website on our platform includes variety of content sources. There are a number of ways to do this, and our client services teams can help craft a robust content strategy for your website. Syndicated content should be a portion, not the entirety, of any content generation strategy.
Bazaarvoice has developed metadata that describes UGC on your website so you can assess if Google is indexing this content. You can choose the appropriate command from the options in the following list and perform a Google search of the bolded text using your domain in place of client.com. These searches will return a list of URLs where reviews are indexed and the total number of indexed pages.
The following searches will help you determine what Google is indexing.
site:client.com intext:bvseo_fps
—This search returns pages implemented using Bazaarvoice's most current client-side (JavaScript or "hosted display") solution. If you implemented our platform (or upgraded) since November 2013, use this search option.
site:client.com intext:bvseo_bulk
—This search returns pages implemented using Bazaarvoice's most current server-side solution. If you implemented our platform (or upgraded) since November 2013 and completed "Smart SEO" or "Cloud SEO" implementation step,use this search option.
site:client.com intext:bvseo_pps
—This search returns pages implemented using Bazaarvoice's legacy client-side (JavaScript or hosted display) solution. If you implemented our platform on your site before November 2013 and haven't made many changes since, use this search option.
site:client.com intext:bvseo_lps
—This search returns pages implemented using Bazaarvoice's legacy server-side solution. Historically, server-side content is the only type of content that search engines could read. If you implemented our platform on your site before November 2013, and haven't made many changes since, use this search option.
You can append the following add-ons to the above commands to filter your search results.
intext:co_hasreviews
—Append this command to return only pages that have reviews.
intext:co_noreviews
—Append this command to return only pages that do not have reviews.
intext:bvpage2n
—Append this command to return pages of review content beyond the first 8 reviews. For example, consider a product that displays 8 reviews on the first page, 30 reviews on the second page, and 12 reviews on the third page for a total of 50 reviews. This query will return two URLs for bvpage2n.
intext:bvpage1
—Append this command to return only the first page of review content.
Refer to the following sections to help troubleshoot your BVSEO implementation.
Perform the following diagnostic searches in Google.
Edit the URLs in these searches to replace example.com with the domain you are testing. Then, load the URL from a web browser.
http://www.google.com/search?num=100&filter=0&q=intext:bvseo_bulk+-inurl:bvrrp+site:example.com
http://www.google.com/search?num=100&filter=0&q=intext:bvseo_bulk+inurl:bvrrp+site:example.com
If the answer to both questions is yes, load one of the pages listed in the search results and continue to Additional verification. If not, proceed to Manual Verification.
This is one of the most common mistakes. If the page contains a rel="canonical" tag, the URL must contain the bv pagination parameter. In most cases, clients wrap the canonical tag with a conditional and do not include it when any of the following parameters appear on the URL: bvrrp, bvqap, bvsyp, bvstate, and bvpage. Refer to Canonical tags for more information.
To improve rank for search phrases that contain the word reviews, we strongly recommend appending the word reviews to the <title> and <h1> tags when bvrrp appears in the URL.
Across all Bazaarvoice clients who have properly deployed BVSEO, clients with clean and minimalistic HTML are given rich snippet stars much more consistently. Bazaarvoice has noted that pages with approximately 600 total lines of code tend to get rich snippet stars in 100% of diagnostic searches while pages with over 4,000 lines of code per page tend to get stars about 60% of the time.
View the HTML source code to investigate the following questions.
Search for BVSEOCPS_GEN in the source code (use Ctrl+f or Command+f to run the Find query). If it is not found, search for BVRRSourceID. If neither of these are found, BVSEO is not in your page. Contact your developer to review the Bazaarvoice integration.
If pagination links are intentionally disabled in the BVSEO configuration, proceed to Additional verification.
If you are using the Ratings & Reviews configuration, the following code should appear:
<div itemscope itemtype="http://schema.org/Product"> <div id="BVRRContainer"> <!--begin-bvseo-reviews--> <meta itemprop="name" content="Product Name" /> <!--begin-aggregate-rating--> <div id="bvseo-aggregateRatingSection" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span class="bvseo-itemReviewed" itemprop="itemReviewed">Product Name</span> is rated <span class="bvseo-ratingValue" itemprop="ratingValue">4.8571</span> out of <span class="bvseo-bestRating" itemprop="bestRating">5</span> by <span class="bvseo-reviewCount" itemprop="reviewCount">14</span>. </div> <!--end-aggregate-rating--> <!--begin-reviews--> <div id="bvseo-reviewsSection"> <!--content removed for example--> </div> <!--end-reviews--> </div> </div>If pagination links are working properly, select the link to page 2 in the Safari source code viewer and view the following code.
<a href="http://www.softsurroundings.com/5/23986/P/Newport_Beach_Pant/View_All/?bvrrp=4398/reviews/product/2/23986.htm">
Note that the page number appears immediately after /product/. Take note of the page you are attempting to load. The full URL will also appear in the address bar after the page loads.
After the page loads, verify that the User Agent is still googlebot, or re-do the User Agent switcher to reload the page. Check if the appropriate page of SEO content has loaded into the source code. Using view page source, find bvseo-bulk-cp in your HTML source code. The number following cp- is the page number, as shown in the code below. This number should match the page number in the address bar.<ul id="BVSEO_meta" style="display:none;important"> <li data-bvseo="bvDateModified">y_2020, m_11, d_30, h_16</li> <li data-bvseo="ps">bvseo_bulk, prod_bvrr, vn_bulk_3.0.12</li> <li data-bvseo="cp">cp_10, bvpage2n</li> <li data-bvseo="co">co_hasreviews, tv_34, tr_250</li> <li data-bvseo="cf">loc_en_US, sid_12345, prod, sort_[SortEntry(order=SUBMISSION_TIME, direction=DESCENDING)]</li> <li data-bvseo="diagnostics">clientName_YourClientNameHere</li> </ul>
If you don’t use the Ratings & Reviews configuration, find BVRRSelectedPageNumber in the HTML source code. The number after the tag will indicate the page number.
If you confirm that the appropriate page of content loaded, pagination links work properly. Return to a product page, not the paginated version, and proceed to Additional verification.
An exceptionally low execution timeout may have occurred. To override this, you can enable developer tools and override the User Agent in Safari, as follows:
The user agent will now cause the BVSEO SDK to operate using a more generous execution timeout while you are working inside that browser window or tab. You must go through this process again if you open a new browser window or tab.
If results were found for Diagnostic queries or Manual verification, open one of the pages found in search results and view the HTML source to investigate the following questions.
Find bvDateModified in the HTML source code. Date stamps are formatted YYYY-MM-DDThh:mmTZD, according to ISO 8601 standard . The date stamp adjacent to bvDateModified should always be less than two days old. For example:
<li id="bvDateModified">2014-06-15</li>
Search for data-bvseo="cf” in the source code and look at the characters that immediately follow it. If you find prod, BVSEO is configured to use production data, which is what you want. If you find stg, BVSEO is configured to use staging data and you should contact your developer to fix it.
To verify that you are displaying the correct content, find itemprop="description” in the source code and find an instance where review content immediately follows, as shown in the example below:
<span itemprop="description">I got to try this chicken jerky flavor...
Compare the first few words of that review with the reviews displayed in the page for end users. If a new review has come into the system since the last SEO update, there may be a difference. Run this test a few times to verify.
View the source code and rendered HTML using the "inspect element" feature of your browser. Verify that the BVSEO contents are located in the proper <div>
tag. To determine this, look for BVRRContainer or BVReviewsContainer in the source code. If the <div>
tag opens and closes immediately as in this example:
<div id="BVRRContainer"></div>
The content is not in the proper format. The following code example shows what the <div>
content should look like.
Search for schema.org/AggregateRating in the source code. If that is not found, search for schema.org/Review. If neither is found, it is likely that the client is configured to use an old version of BVSEO and the configuration should be updated to use schema.org format for structured markup.
BVSEO markup must appear as HTML, not escaped characters. Find begin-bvseo in the source code. If the content appears with escaped characters, as shown in the example below, contact your developer to solve the issue.
<!--begin-bvseo-reviews-->
The markup should look like this:
<!--begin-bvseo-reviews-->
BVSEO uses a tested technique to decorate pagination links, but never hides them with CSS or NOSCRIPT. Google will not crawl links that are hidden by CSS or NOSCRIPT. It is a common mistake to add a style="display:none;" property to the <div>
tag, which contains BVSEO. Doing so blocks search-friendly pagination.
Add the bvreveal=debug parameter to the URL of any page where BVSEO is implemented.
Example: http://yoursite.net/ExampleGetContent.aspx?bvreveal=debug
The bvreveal=debug parameter adds BVSEOSDK_meta and BVSEOSDK_DEBUG lists to the source code, which contain information about your implementation. If there is no UGC, bvseo-msg will provide more details.
Check if content exists for the requested contentURL, as described in the following steps:
<li data-bvseo="contentURL">http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm</li>
curl –i
command. Example: curl –i "http://seo-stg.bazaarvoice.com/myshco-69cb945801532dcfb57ad2b0d2471b68/Main_Site-en_US/reviews/product/1/5000001.htm"
If the curl command does not return content, it could be a firewall issue or no content exists for this ProductID. Contact your Bazaarvoice representative for further troubleshooting.
The following error messages may appear when debugging.
Be aware that changes made to BVSEO in the staging environment are updated once a week only, on Saturday.
Verify the following: